package com.lino.design;

/**
 * @description: 单例模式-使用类的内部类(线程安全)
 * @author: lingjian
 * @createDate: 2022/12/20 8:52
 */
public class Singleton_04 {

    private static class SingletonHolder {
        private static Singleton_04 instance = new Singleton_04();
    }

    private Singleton_04() {
    }

    public static Singleton_04 getInstance() {
        return SingletonHolder.instance;
    }
}
